#! /bin/bash
export LANG=zh_CN.UTF-8
HIVE_HOME=/usr/bin/hive


${HIVE_HOME} -S -e "
create database dm
use dm;
drop table if exists sq_dm_cul_day_cnt;
create table sq_dm_cul_day_cnt(
    c_day string,
    c_month string,
    c_year string,
    orgin_type string,
    itcast_school_id int,
    itcast_school_name string,
    itcast_subject_id int,
    itcast_subject_name string,
    tdepart_id int,
    tdepart_name string,
    origin_channel string,
    r_num_total decimal(38,2),
    s_num_total decimal(38,2),
    live_num_total decimal(38,2),
 r_cnt_total decimal(38,2)
)row format delimited
fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');"